import { defineStore } from 'pinia'
import { ref, computed } from 'vue'

/**
 * 关于我们
 */

const useAbout = defineStore(
  'about',
  () => {
    const key = ref(0)
    const setKey = () => {
      key.value++
    }

    const isLocate = ref(false)
    const setLocate = (val) => {
      isLocate.value = val
    }

    return {
      key,
      setKey,
      isLocate,
      setLocate
    }
  },
  {
    persist: {
      enabled: true,
      strategies: [
        {
          storage: localStorage
        }
      ]
    }
  }
)

export default useAbout
